- Garland T Jr, Adolph SC (1994) Why not to do two-species comparative studies: limitations on inferring adaptation. Physiol Zool 67:797-828.
Last updated: 2017-04-02
Longer lectures on phylogenetic comparative methods (much overlap with this lecture, but much more detail):
Mesquite (http://mesquiteproject.org/)
Common packages:
You have a tree and data - What do I do now?
Data from Garland et al. (1992)
"Real" branch lengths:
Arbitrary branch lengths:
Either can be transformed.
These models are all accomplished via branch length transformations.
Simulate 100 Brownian motion random walks with a length of 100 steps.
set.seed(3) nsim <- 100 # Number of simulations t <- 0:100 # Time s2 <- 0.01 # Variance X <- foreach(i = 1:nsim, .combine = rbind) %do% c(0, cumsum(rnorm(n = length(t) - 1, sd = sqrt(s2))))
The OU model describes the motion of a species in the phenotypic space whereby the species moves randomly within the space, but is influenced by a central tendency such that large deviations from the central optimum receive a stronger force back toward the optimum (Blomberg et al. 2003)
\[dX(t) = \alpha[\theta - X(t)]dt + \sigma dB(t)\]
Key readings:
library(phytools) set.seed(331) tree <- pbtree(n = 15, scale = 10)
\[dX(t) = \alpha[\theta - X(t)]dt + \sigma dB(t)\]
x <- fastBM(tree,
a = 0, # Ancestral state at the root node
theta = 3, # Optimum
alpha = 0.2, # Strength of selection
s2 = 0.1, # Variance of the BM process
internal = TRUE) # Return states for internal nodes
Rather than simulating data, estimate the values for \(\alpha\) and \(\theta\).
Evolution toward two local optima:
\(\theta_{small} = 0.25\) mm head length.
Pagel's \(\lambda\): how well does the tree fit the predicted covariance among the trait values
\[\lim_{d\to0} = \mbox{"Star phylogeny"}\]
nlme::gls()gls() to fit the squid model, allowing correlated variance on a per-month basisSee ?corClasses
corBrownian: BM model of correlationcorPagel: Pagel's \(\lambda\)corMartins: OU model originally proposed by Martins and Hansen (1997)corBlomberg: ACDC model of Blomberg et al. (2003)library(nlme)
fm1 <- gls(log_Home_Range ~ log_Mass, data = lbr,
correlation = corBrownian(phy = tree))
summary(fm1)
## Generalized least squares fit by REML ## Model: log_Home_Range ~ log_Mass ## Data: lbr ## AIC BIC logLik ## 94.44211 99.99256 -44.22106 ## ## Correlation Structure: corBrownian ## Formula: ~1 ## Parameter estimate(s): ## numeric(0) ## ## Coefficients: ## Value Std.Error t-value p-value ## (Intercept) -1.423845 0.6193642 -2.298882 0.026 ## log_Mass 1.261576 0.1767717 7.136753 0.000 ## ## Correlation: ## (Intr) ## log_Mass -0.572 ## ## Standardized residuals: ## Min Q1 Med Q3 Max ## -1.5273768 -0.3768099 0.2233644 0.5177016 1.5821557 ## ## Residual standard error: 1.255639 ## Degrees of freedom: 49 total; 47 residual
fm2 <- gls(log_Home_Range ~ log_Mass + Clade , data = lbr,
correlation = corBrownian(phy = tree))
summary(fm2)
## Generalized least squares fit by REML ## Model: log_Home_Range ~ log_Mass + Clade ## Data: lbr ## AIC BIC logLik ## 92.13749 99.45206 -42.06875 ## ## Correlation Structure: corBrownian ## Formula: ~1 ## Parameter estimate(s): ## numeric(0) ## ## Coefficients: ## Value Std.Error t-value p-value ## (Intercept) -2.233013 0.8012034 -2.787073 0.0077 ## log_Mass 1.317072 0.1777494 7.409710 0.0000 ## CladeCarnivorans 1.605512 1.0302879 1.558314 0.1260 ## ## Correlation: ## (Intr) lg_Mss ## log_Mass -0.557 ## CladeCarnivorans -0.648 0.200 ## ## Standardized residuals: ## Min Q1 Med Q3 Max ## -1.0443623 -0.1687814 0.1826581 0.6855996 1.0732801 ## ## Residual standard error: 1.236984 ## Degrees of freedom: 49 total; 46 residual
fm3 <- gls(log_Home_Range ~ log_Mass * Clade , data = lbr,
correlation = corBrownian(phy = tree))
summary(fm3)
## Generalized least squares fit by REML ## Model: log_Home_Range ~ log_Mass * Clade ## Data: lbr ## AIC BIC logLik ## 94.16136 103.1947 -42.08068 ## ## Correlation Structure: corBrownian ## Formula: ~1 ## Parameter estimate(s): ## numeric(0) ## ## Coefficients: ## Value Std.Error t-value p-value ## (Intercept) -2.322649 0.8699739 -2.669792 0.0105 ## log_Mass 1.352785 0.2200051 6.148882 0.0000 ## CladeCarnivorans 1.791226 1.2329695 1.452774 0.1532 ## log_Mass:CladeCarnivorans -0.106957 0.3807330 -0.280924 0.7801 ## ## Correlation: ## (Intr) lg_Mss CldCrn ## log_Mass -0.635 ## CladeCarnivorans -0.706 0.448 ## log_Mass:CladeCarnivorans 0.367 -0.578 -0.536 ## ## Standardized residuals: ## Min Q1 Med Q3 Max ## -1.0564654 -0.1557668 0.1917349 0.6952910 1.0664477 ## ## Residual standard error: 1.249557 ## Degrees of freedom: 49 total; 45 residual
Estimating OU parameter alpha often fails (Error in corFactor.corStruct(object))
myOU <- function(alpha, dat, tree){
fm <- gls(log_Home_Range ~ log_Mass, data = dat,
correlation = corMartins(alpha, tree, fixed = TRUE))
return(as.numeric(fm$logLik))
}
alpha <- optimize(f = myOU, interval = c(0, 2),
dat = lbr, tree = tree, maximum = TRUE)
alpha
## $maximum ## [1] 0.01209072 ## ## $objective ## [1] -43.50331
Fit a model with the alpha parameter fixed at the optimized value:
ou_mod <- corMartins(value = alpha$maximum,
phy = tree, fixed = TRUE)
fm4 <- gls(log_Home_Range ~ log_Mass, data = lbr,
correlation = ou_mod)
## Generalized least squares fit by REML ## Model: log_Home_Range ~ log_Mass ## Data: lbr ## AIC BIC logLik ## 93.00662 98.55706 -43.50331 ## ## Correlation Structure: corMartins ## Formula: ~1 ## Parameter estimate(s): ## alpha ## 0.01209072 ## ## Coefficients: ## Value Std.Error t-value p-value ## (Intercept) -1.212025 0.6601609 -1.835954 0.0727 ## log_Mass 1.165679 0.1737639 6.708405 0.0000 ## ## Correlation: ## (Intr) ## log_Mass -0.521 ## ## Standardized residuals: ## Min Q1 Med Q3 Max ## -1.7003954 -0.3764105 0.2171781 0.5543371 1.7814896 ## ## Residual standard error: 1.066277 ## Degrees of freedom: 49 total; 47 residual
Models 5 and 6 ANCOVA with OU. Models 7-9, estimate Pagel's \(\lambda\).
| Mass | Mass + Clade | Mass * Clade | |
|---|---|---|---|
| Brownian Motion | 95.0 | 93.0 | 95.6 |
| Stabilizing Selection (OU) | 93.5 | 87.6 | 90.3 |
| Pagel's \(\lambda\) | 96.7 | 93.5 | 96.2 |
OU model:
\[Home~Range \sim Mass + Clade\]
## Generalized least squares fit by REML ## Model: log_Home_Range ~ log_Mass + Clade ## Data: lbr ## AIC BIC logLik ## 86.67971 93.99427 -39.33985 ## ## Correlation Structure: corMartins ## Formula: ~1 ## Parameter estimate(s): ## alpha ## 0.03533854 ## ## Coefficients: ## Value Std.Error t-value p-value ## (Intercept) -1.919568 0.4851383 -3.956743 0.0003 ## log_Mass 1.226691 0.1686608 7.273123 0.0000 ## CladeCarnivorans 1.391452 0.4100937 3.393010 0.0014 ## ## Correlation: ## (Intr) lg_Mss ## log_Mass -0.855 ## CladeCarnivorans -0.707 0.475 ## ## Standardized residuals: ## Min Q1 Med Q3 Max ## -1.8909506 -0.3117712 0.2184212 1.0933805 1.7774159 ## ## Residual standard error: 0.6911628 ## Degrees of freedom: 49 total; 46 residual
Lecture 11-3
Blomberg, S. P., T. Garland Jr, and A. R. Ives. 2003. Testing for Phylogenetic Signal in Comparative Data: Behavioral Traits Are More Labile. Evolution 57:717–745.
Butler, M., and A. King. 2004. Phylogenetic Comparative Analysis: A Modeling Approach for Adaptive Evolution. American Naturalist 164:683–695.
Garland, T., Jr, and S. C. Adolph. 1994. Why Not to Do Two-Species Comparative Studies: Limitations on Inferring Adaptation. Physiological Zoology 67:797–828.
Garland, T., Jr, P. H. Harvey, and A. R. Ives. 1992. Procedures for the Analysis of Comparative Data Using Phylogenetically Independent Contrasts. Systematic Biology 41:18–32.
Hansen, T. F., and E. Martins. 1996. Translating Between Microevolutionary Process and Macroevolutionary Patterns: The Correlation Structure of Interspecific Data. Evolution 50:1404–1417.
Harmon, L. J., J. B. Losos, T. J. Davies, R. G. Gillespie, J. L. Gittleman, W. Bryan Jennings, K. H. Kozak, M. A. McPeek, F. Moreno-Roark, T. J. Near, A. Purvis, R. E. Ricklefs, D. Schluter, J. A. Schulte Ii, O. Seehausen, B. L. Sidlauskas, O. Torres-Carvajal, J. T. Weir, and A. Ø. Mooers. 2010. Early Bursts of Body Size and Shape Evolution Are Rare in Comparative Data. Evolution 64:2385–2396.
Martins, E., and T. F. Hansen. 1997. Phylogenies and the Comparative Method: A General Approach to Incorporating Phylogenetic Information into the Analysis of Interspecific Data. American Naturalist 149:646–667.
Nunn, C. L. 2011. The Comparative Approach in Evolutionary Anthropology and Biology. University of Chicago Press, Chicago.
Nunn, C. L., and R. A. Barton. 2001. Comparative Methods for Studying Primate Adaptation and Allometry. Evolutionary Anthropology 10:81–98.
Uhlenbeck, G. E., and L. S. Ornstein. 1930. On the Theory of the Brownian Motion. Physical Review 36:823–841.